set matsize 11000

*** Table A7, panel I
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe country_baseline_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_pre_trust_binary know_vax_treatment i.rollout_fe_numeric i.country_baseline_trust_numeric##i.country_exp_numeric ///
		if (know_vaccine_country_china == 1 | know_vaccine_country_russia == 1 | know_vaccine_country_uk == 1 | know_vaccine_country_us == 1) & country_exp != "india", cluster(mergeid)
	noisily margins, dydx(know_vax_treatment)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	g know_vax_treatment = .
	rename trust_biden_baseline trust_us_baseline
	foreach x of varlist rollout_fe trust_*_baseline {
		egen `x'_numeric = group(`x')
	}
	foreach y in china russia uk us {
		replace know_vax_treatment = know_vaccine_country_`y'
		eststo, title("`y'") : ologit trust_`y'_end_pre know_vax_treatment i.rollout_fe_numeric i.trust_`y'_baseline_numeric ///
			if (know_vaccine_country_china == 1 | know_vaccine_country_russia == 1 | know_vaccine_country_uk == 1 | know_vaccine_country_us == 1), cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(know_vax_treatment) varlabel(know_vax_treatment "Country developed vaccine")


*** Table A12, Column 3, Panel A
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe exp_block country_baseline_trust country_pre_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_post_trust treat_rank i.exp_block_numeric i.country_pre_trust_numeric##i.country_exp_numeric, cluster(mergeid)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	foreach x of varlist rollout_fe exp_block trust_*_end_pre {
		egen `x'_numeric = group(`x')
	}
	foreach y in china india russia uk us {
		eststo, title("`y'") : ologit trust_`y'_end_post treat_rank i.exp_block_numeric i.trust_`y'_end_pre_numeric, cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(treat_rank) varlabel(treat_rank "Treated")



*** Table A12, Column 3, Panel B
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe exp_block country_baseline_trust country_pre_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_post_trust 1.treat_rank##c.rev_rank_reported_ties i.exp_block_numeric i.country_pre_trust_numeric##i.country_exp_numeric, cluster(mergeid)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	g rev_rank_reported_ties = .
	foreach x of varlist rollout_fe exp_block trust_*_end_pre {
		egen `x'_numeric = group(`x')
	}
	foreach y in china india russia uk us {
		replace rev_rank_reported_ties = rev_rank_doses_ties_`y'
		eststo, title("`y'") : ologit trust_`y'_end_post 1.treat_rank##c.rev_rank_reported_ties i.exp_block_numeric i.trust_`y'_end_pre_numeric, cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(1.treat_rank#*) varlabel(1.treat_rank#c.rev_rank_reported_ties "Treated $\times$ Reversed rank")



*** Table A12, Column 3, Panel C
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe exp_block country_baseline_trust country_pre_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_post_trust 1.treat_rank##c.percentage_reported i.exp_block_numeric i.country_pre_trust_numeric##i.country_exp_numeric, cluster(mergeid)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	g percentage_reported = .
	foreach x of varlist rollout_fe exp_block trust_*_end_pre {
		egen `x'_numeric = group(`x')
	}
	foreach y in china india russia uk us {
		replace percentage_reported = vax_`y'
		eststo, title("`y'") : ologit trust_`y'_end_post 1.treat_rank##c.percentage_reported i.exp_block_numeric i.trust_`y'_end_pre_numeric, cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(1.treat_rank#*) varlabel(1.treat_rank#c.percentage_reported "Treated $\times$ Share")



*** Table A12, Column 3, Panel D
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe exp_block country_baseline_trust country_pre_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_post_trust 1.treat_rank##c.actual_gte_prior i.exp_block_numeric i.country_pre_trust_numeric##i.country_exp_numeric, cluster(mergeid)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	g actual_gte_prior = .
	foreach x of varlist rollout_fe exp_block trust_*_end_pre {
		egen `x'_numeric = group(`x')
	}
	foreach y in china india russia uk us {
		replace actual_gte_prior = actual_gte_prior_`y'
		eststo, title("`y'") : ologit trust_`y'_end_post 1.treat_rank##c.actual_gte_prior i.exp_block_numeric i.trust_`y'_end_pre_numeric, cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(1.treat_rank#*) varlabel(1.treat_rank#c.actual_gte_prior "Treated $\times$ Reversed rank $\geq$ Reversed prior")



*** Table A12, Column 3, Panel E
qui {
	eststo clear
	* Pooled
	use "vaccine_diplomacy_long_stata.dta", clear
	foreach x of varlist country_exp rollout_fe exp_block country_baseline_trust country_pre_trust {
		egen `x'_numeric = group(`x')
	}
	eststo, title("pooled") : ologit country_post_trust 1.treat_rank##c.rev_rank_reported_ties 1.treat_rank##c.rev_rank_prior i.exp_block_numeric i.country_pre_trust_numeric##i.country_exp_numeric, cluster(mergeid)
	* By country
	use "vaccine_diplomacy_wide.dta", clear
	g rev_rank_reported_ties = .
	g rev_rank_prior = .
	foreach x of varlist rollout_fe exp_block trust_*_end_pre {
		egen `x'_numeric = group(`x')
	}
	foreach y in china india russia uk us {
		replace rev_rank_reported_ties = rev_rank_doses_ties_`y'
		replace rev_rank_prior = rev_prior_beliefs_`y'
		eststo, title("`y'") : ologit trust_`y'_end_post 1.treat_rank##c.rev_rank_reported_ties 1.treat_rank##c.rev_rank_prior i.exp_block_numeric i.trust_`y'_end_pre_numeric, cluster(mergeid)
	}
}
estout, style(tex) cells(b(star fmt(3)) se(par)) stats(N, fmt(%9.0fc)) keep(1.treat_rank#*) ///
	varlabel(1.treat_rank#c.rev_rank_reported_ties "Treated $\times$ Reversed rank" 1.treat_rank#c.rev_rank_prior "Treated $\times$ Reversed Prior")